package cn.lixu.product.domain;

import cn.lixu.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author LiXu
 * @date 2022/08/06 0006 10:07:51
 */
@Data
public class Product extends BaseDomain {
    private String name;
    //成本价
    private BigDecimal costprice;
    //售价
    private BigDecimal saleprice;
    //宠物缩略图
    private String resources;
    //状态【默认为0下架】
    private Integer state = 0;
    //销售数量
    private Long salecount;
    //下架时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GTM+8")
    private Date offsaletime;
    //上架时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GTM+8")
    private Date onsaletime;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GTM+8")
    private Date createtime = new Date();
    //宠物来源id【null为平台自有】【寻主ID】
    //接收前端传过来的参数，还能传输数据
    private ProductDetail productDetail;


}
